home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Format (UK) 188
/
01-04 PC Format 188 [2006-06] DVD side 1_.iso
/
DiscContents
/
Workshops
/
Workshops_Games
/
Sphere
/
InstallSphere1.0.exe
/
games
/
jonboy_kooparoids
/
scripts
/
init.js
< prev
next >
Wrap
Text File
|
2003-02-18
|
1KB
|
64 lines
// ********************************
// init.js Script
// ********************************
// * * * System Includes
EvaluateSystemScript("audio.js");
EvaluateSystemScript("screen.js");
// * * * Custom Includes
EvaluateScript("intro.js");
EvaluateScript("fademessage_jonboy.js");
EvaluateScript("jonboy_debug.js");
EvaluateScript("dialog.js");
EvaluateScript("jonboy_sprite.js");
EvaluateScript("kooparoids.js");
// * * * Global variables
var myLog;
var HEAD_HEIGHT = 64;
//var CONST_VIEW_WIDTH = 512;
//var CONST_VIEW_HEIGHT = 384;
var CONST_VIEW_WIDTH = 512+HEAD_HEIGHT;
var CONST_VIEW_HEIGHT = 384;
var BOARD_CENTER_X = CONST_VIEW_WIDTH/2;
var BOARD_CENTER_Y = HEAD_HEIGHT + (CONST_VIEW_HEIGHT/2);
/* function Delay(milliseconds)
{
var start = GetTime();
while (GetTime() - start < milliseconds);
} */
// FIRST FUNCTION called by game - put calls to init routines here!
function game(){
NewGame();
}
function NewGame(){
// Set up debug log
jonboy_debug_begin(1);
/**/
// Splash screen
PlaySound("evillaugh.wav");
IntroImage("KooparoidSplash02.png");
// "BackStory"
ShowIntroStory();
/**/
// Keep player from IMMEDIATELY escaping with ESC key
BindKey(KEY_ESCAPE, 'ExitMapEngine()', 'DoNull()');
// Do stuff
KooparoidsPlay();
// Clean up and close out
AuthorSplash();
UnbindKey(KEY_ESCAPE);
}